import javax.swing.JOptionPane; //for GUI

public class SevenWizards1
{
    public static void main(String[] args)
    {
        int level, attack, defense, movepower, damage;
        String s_level = JOptionPane.showInputDialog(
                                        null,
                                        "Enter level",
                                        "Input",
                                        JOptionPane.QUESTION_MESSAGE);
        String s_attack = JOptionPane.showInputDialog(
                                        null,
                                        "Enter attack",
                                        "Input",
                                        JOptionPane.QUESTION_MESSAGE);
        String s_defense = JOptionPane.showInputDialog(
                                        null,
                                        "Enter defense",
                                        "Input",
                                        JOptionPane.QUESTION_MESSAGE);
        String s_movepower = JOptionPane.showInputDialog(
                                        null,
                                        "Enter movepower",
                                        "Input",
                                        JOptionPane.QUESTION_MESSAGE);
        level = Integer.parseInt(s_level);
        attack = Integer.parseInt(s_attack);
        defense = Integer.parseInt(s_defense);
        movepower = Integer.parseInt(s_movepower);
        //rand
        
  //serebii      damage = ((((2*level/5)*attack*movepower/defense)/50)+2);
        
  //smogon      damage = (((((((level*2/5)+2)*movepower*attack/50)/defense))+2));
        
  /* mew's */     damage = ((38*level+4)/7)*((attack+movepower)/(defense));
        
        JOptionPane.showMessageDialog(
                                      null,
                                      damage,
                                      "Output",
                                      JOptionPane.INFORMATION_MESSAGE);
    }
}